﻿using System;
using System.IO;
using System.Reflection;

namespace NthDownload.Common
{
    public class Paths
    {
        #region Class Members

        private static readonly string _appDataFolder = "NthDownload";
        private static readonly string _pluginsFolder = "Plugins";
        private static readonly string _bandwidthProviderPluginsFolder = "BandwidthProviders";
        private static readonly string _downloadPluginsFolder = "Downloads";
        private static readonly string _dataFolder = "Data";

        #endregion Class Members

        #region Properties

        public static string AppDataPath
        {
            get
            {
                return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), _appDataFolder);
            }
        }

        public static string PluginsPath
        {
            get
            {
                return Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), _pluginsFolder);
            }
        }

        public static string BandwidthProviderPluginsPath
        {
            get
            {
                return Path.Combine(PluginsPath, _bandwidthProviderPluginsFolder);
            }
        }

        public static string DownloadPluginsPath
        {
            get
            {
                return Path.Combine(PluginsPath, _downloadPluginsFolder);
            }
        }

        public static string DataPath
        {
            get
            {
                return Path.Combine(AppDataPath, _dataFolder);
            }
        }

        #endregion Properties
    }
}
